<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets">
    
    <h:head>
        <title>Make Timetable</title>
    </h:head>
    <f:view>
<h:body>
<ui:composition	template="../includes/template.xhtml">
      <ui:define name="mainbody">
          <center>
			<h:form>
				<p:panel id="panel" header="Make Timetable" style="min-height: 550px" styleClass="prime_panel">
					<center>
						 <p:growl id="growl" showDetail="true" sticky="false"
								autoUpdate="true" showSummary="false" />
                            
						<p:spacer height="20" />
						<TABLE cellpadding="4px" cellspacing="8px">

							<tr>
								<td>School Start Time: <h:outputText value="*" style="color:red"/></td>
								<td><p:calendar value="#{makeTimeTableBean.schoolStart}"
										pattern="HH:mm" timeOnly="true" readOnlyInputText="true" required="true" requiredMessage="Please provide School Start Time" />
								</td>
							</tr>

							<tr>
								<td>School End Time:<h:outputText value="*" style="color:red"/></td>
								<td><p:calendar value="#{makeTimeTableBean.schoolEnd}"
										pattern="HH:mm" timeOnly="true" readOnlyInputText="true"  required="true" requiredMessage="Please provide School End Time" />
								</td>
							</tr>

							<tr>
								<td>Break Start Time:<h:outputText value="*" style="color:red"/></td>
								<td><p:calendar value="#{makeTimeTableBean.breakStart}"
										pattern="HH:mm" timeOnly="true" readOnlyInputText="true"  required="true" requiredMessage="Please provide Break Start Time" />
								</td>
							</tr>

							<tr>
								<td>Break End Time:<h:outputText value="*" style="color:red"/></td>
								<td><p:calendar value="#{makeTimeTableBean.breakEnd}"
										pattern="HH:mm" timeOnly="true" readOnlyInputText="true"  required="true" requiredMessage="Please provide Break End Time" />
								</td>
							</tr>

							<tr>
								<td>
								</td>
								<td><p:spacer width="30"/> 
								<p:commandButton id="makeButton" value=" Make "	action="#{makeTimeTableBean.make}"   />
								</td>
							</tr>
						</TABLE>
						<p:blockUI block="panel" trigger="makeButton">  
					        Making Time Table ...<br /> <br />  
					        <p:graphicImage value="../../images/loading.gif"/>  
					    </p:blockUI>
					</center>
				</p:panel>
			</h:form>
		  </center>
           </ui:define>
          </ui:composition>
       </h:body>
    </f:view>
</html>
